<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@page import="com.demoweb.model.dto.Membership"%>
<%@page import="com.demoweb.model.dto.Score"%>
<%@page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FLAPPY FISH</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="/demoweb/styles/flappystyle.css" rel="stylesheet" type="text/css" />
</head>
<body>

<%	pageContext.include("/WEB-INF/views/flappy/header.jsp");%>

  <div id="content" >
  <div id="sidebar" style="width: 240px; height:152px; background-image: url('/demoweb/images/login.png'); ">
    <% pageContext.include("/WEB-INF/views/flappy/flappylogin.jsp"); %>
    
<div id="sidebar" style="width: 240px; margin-left: 0px; margin-top: 10px; background-image: url('/demoweb/images/login3.png')">
	<% pageContext.include("/WEB-INF/views/flappy/rank/rankingmenu.jsp"); %>
</div>

  </div>	
  <!-- ---------------------------------- Main page content ----------------------------------- -->
<div id="main" style="width: 480px; margin-left: 50px ; margin-top: 100px">
			<h1 style="text-align: center; color: green;">랭킹</h1>
			<% ArrayList<Score> scores= (ArrayList<Score>)request.getAttribute("ranking");%>		


			<table border="1" style="width:600px; background-color: white;" align="center">
				<tr style="background-color:orange;height:30px">
					<th style="width:50px">번호</th>
					<th style="width:400px">제목</th>
					<th style="width:150px;text-align:center">작성일</th>
				</tr>
				
				<%if(scores.size() < 20){  %>
				<% for (int i = 0;i<scores.size();i++) { %>
				<tr style="height:30px">
					<td><%= i+1 %></td>
					<td style="text-align:left;padding-left:10px">
						<a <%= scores.get(i).getGameNo() %>'>
							<%= scores.get(i).getMemberId() %>
						</a>
					</td>
					<td><%= scores.get(i).getScore() %></td>
				</tr>
				<% } %>
				<% }else{ %>
				<% for (int i = 0;i<20;i++) { %>
				<tr style="height:30px">
					<td><%= i+1 %></td>
					<td style="text-align:left;padding-left:10px">
						<a <%= scores.get(i).getGameNo() %>>
							<%= scores.get(i).getMemberId() %>
						</a>
					</td>
					<td><%= scores.get(i).getScore() %></td>
				</tr>
				<% } %>
				<% } %>
			</table>
			<br /><br /><br /><br />
		</div>
    <!-- ---------------------------------- Main page content ----------------------------------- -->
</div>
<div id="footer"  style="margin-top: 568px; float: inherit">
  <p id="legal">Copyright &copy; 2007 Red Avenue. All Rights Reserved. Designed by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
  <p id="links"><a href="http://www.free-css.com/">Home</a> | <a href="http://www.free-css.com/">Terms of Use</a></p>
</div>
</body>
</html>  